<!DOCTYPE html>
<html lang="en">
 <head> 
  <meta charset="utf-8" /> 
  <title>西瓜后台管理</title> 
  <meta name="renderer" content="webkit" /> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" /> 
  <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all" /> 
  <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all" /> 
  <link rel="stylesheet" href="../../../layuiadmin/style/cueManagement.css" media="all" /> 
 </head> 
 <body>
  <div class="layui-fluid"> 
  <div class="layui-card layui-form-item">
          <form class="layui-form layui-form-search layui-clear form-search" action="">
              <div class="span-text">
                 <span>当前状态：</span>
                 <span>已关联零售订单</span>
              </div>
              <div class="btn-look">
                  <button class="layui-btn layui-bg-blue layui-btn-sm" lay-submit lay-filter="LAY-user-back-search">查看</button>
              </div>
          </form>
   </div> 
   <div class="layui-card" id="tabFir">
    <ul id="tab-btn"></ul>
    <form class="layui-form layui-clear detail" action="" wid150="">   
     <div class="layui-card-block"> 
        <div class="layui-card-header title">客户信息</div> 
        <div class="layui-card-body"> 
            <div class="layui-form-item"> 
                <label class="layui-form-label">本次跟进时间</label> 
                <div class="layui-input-inline"> 
                  <input type="text" name="customerName" value=""class="layui-input" id="time"/> 
                </div> 
            </div>
            <div class="layui-form-item"> 
                <label class="layui-form-label">客户姓名</label> 
                <div class="layui-input-inline"> 
                  <input type="text" name="customerName" value="" class="layui-input" /> 
                </div> 
            </div> 
            <div class="layui-form-item"> 
                <label class="layui-form-label">性别</label> 
                <div class="layui-input-inline"> 
                   <input type="text" name="sex" value="" class="layui-input" /> 
                </div> 
            </div> 
            <div class="layui-form-item"> 
                <label class="layui-form-label">手机号</label> 
                <div class="layui-input-inline"> 
                   <input type="text" name="phoneNumber" value="" class="layui-input" /> 
                </div> 
            </div> 
            <div class="layui-form-item"> 
                <label class="layui-form-label">客户类型</label> 
                <div class="layui-input-inline"> 
                    <input type="text" name="customerType" value="" class="layui-input" /> 
                 </div> 
            </div> 
            <div class="layui-form-item layui-col-md6 "> 
                <label class="layui-form-label">职业</label> 
                <div class="layui-input-inline"> 
                    <input type="text" name="occupation" value="" class="layui-input" /> 
                </div> 
            </div> 
            <div class="layui-form-item layui-col-md12"> 
                <label class="layui-form-label">工作单位/职位</label> 
                <div class="layui-input-inline"> 
                    <input type="text" name="workUnit" value="" class="layui-input" /> 
                </div> 
                <div class="layui-input-inline"> 
                    <input type="text" name="position" value="" class="layui-input" /> 
                </div> 
            </div> 
            <div class="layui-form-item layui-col-md6 "> 
                <label class="layui-form-label">微信</label> 
                <div class="layui-input-inline"> 
                    <input type="text" name="weChat" value="" class="layui-input" /> 
                </div> 
            </div> 
            <div class="layui-form-item layui-col-md6 "> 
                <label class="layui-form-label">婚否</label> 
                <div class="layui-input-inline"> 
                    <input type="text" name="maritalStatus" value="" class="layui-input" /> 
                </div> 
            </div> 
          </div> 
        </div>
        
        <div class="layui-line"></div> 
        <div class="layui-card-block"> 
          <div class="layui-card-header title">订单关联信息</div> 
          <div class="layui-card-body"> 
            <div class="layui-form-item layui-col-md6 layui-clear-none"> 
              <label class="layui-form-label">证件类型</label> 
              <div class="layui-input-inline"> 
                <input type="text" name="customerName" value=""class="layui-input" /> 
              </div> 
            </div>
            <div class="layui-form-item layui-col-md6 layui-clear-none"> 
              <label class="layui-form-label">证件号码</label> 
              <div class="layui-input-inline"> 
                <input type="text" name="customerName" value="" class="layui-input" /> 
              </div> 
            </div> 
            <div class="layui-form-item layui-col-md6 "> 
                <label class="layui-form-label">邮寄地址</label> 
                <div class="layui-input-inline"> 
                  <input type="text" name="customerName" value=""class="layui-input" /> 
                </div> 
              </div>
              <div class="layui-form-item layui-col-md6 layui-clear-none"> 
                <label class="layui-form-label">邮编</label> 
                <div class="layui-input-inline"> 
                  <input type="text" name="customerName" value="" class="layui-input" /> 
                </div> 
              </div> 
          </div>
        </div>

        <div class="layui-line"></div> 
        <div class="layui-card-block"> 
        <div class="layui-card-header title">跟进信息</div> 
        <div class="layui-card-body"> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">跟进方式</label> 
            <div class="layui-input-block"> 
              <input type="text" name="followTheWay" class="layui-input" readonly="" id="followTheWay"/> 
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">客户意向级别</label> 
            <div class="layui-input-block"> 
              <input type="text" name="customerIntentionLevel" class="layui-input" readonly="" /> 
            </div> 
         </div> 
         <div class="layui-form-item"> 
            <label class="layui-form-label">谈话内容</label> 
            <div class="layui-input-block"> 
              <textarea name="thisConversation" class="layui-textarea" readonly=""></textarea> 
            </div> 
         </div> 
         <div class="layui-form-item"> 
            <label class="layui-form-label">计划下次跟进时间</label> 
            <div class="layui-input-inline"> 
              <input name="onTime" id="date" class="layui-input Wdate" type="text" /> 
            </div> 
         </div> 
        </div>
        </div>

        <div class="layui-line"></div> 
        <div class="layui-card-block"> 
        <div class="layui-card-header title">来店契机</div> 
        <div class="layui-card-body"> 
          <div class="layui-form-item"> 
            <label class="layui-form-label"></label> 
            <div class="layui-input-inline"> 
              <input type="text" name="personalCharacteristics" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">转介绍 - 介绍人：</label> 
            <div class="layui-input-inline"> 
              <input type="text" name="hobby" value="" class="layui-input" /> 
            </div> 
          </div> 
        </div>
        </div>

        <div class="layui-line"></div> 
        <div class="layui-card-block"> 
        <div class="layui-card-header title">需求分析</div> 
        <div class="layui-card-body"> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">个人显著特征</label> 
            <div class="layui-input-inline"> 
               <input type="text" name="personalCharacteristics" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">兴趣爱好</label> 
            <div class="layui-input-inline"> 
              <input type="text" name="hobby" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item layui-col-md12"> 
            <label class="layui-form-label">陪同人员情况</label> 
            <div class="layui-input-inline"> 
               <input type="text" name="pscortPersonnel" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">家庭成员情况</label> 
            <div class="layui-input-inline"> 
               <input type="text" name="familyMember" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item layui-col-md12"> 
            <label class="layui-form-label">当前保有车型</label> 
            <div class="layui-input-block"> 
                <input type="text" name="keepCurrentModels" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">意向车型A</label> 
            <div class="layui-input-inline"> 
              <input type="text" name="intentionModel" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item layui-col-md6 "> 
            <label class="layui-form-label">意向车型B</label> 
            <div class="layui-input-inline"> 
              <input type="text" name="intentionModelB" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item layui-col-md12"> 
            <label class="layui-form-label">意向车型C</label> 
            <div class="layui-input-inline"> 
              <input type="text" name="intentionModelC" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item layui-col-md6 "> 
            <label class="layui-form-label">计划购车预算</label> 
            <div class="layui-input-inline"> 
               <input type="text" name="carBuyingBudgetPlan" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item layui-col-md6 "> 
            <label class="layui-form-label">计划购车时间</label> 
            <div class="layui-input-inline"> 
               <input type="text" name="planCarBuyingTime" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">付款方式</label> 
            <div class="layui-input-block"> 
                <input type="text" name="payment" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item layui-col-md6 "> 
            <label class="layui-form-label">车辆使用场景</label> 
            <div class="layui-input-inline"> 
               <input type="text" name="vehicleSseScene" value="" class="layui-input" /> 
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label"></label> 
            <div class="layui-input-block"> 
               <input type="text" name="testCase" value="" class="layui-input" />               
            </div> 
          </div> 
          <div class="layui-form-item"> 
            <label class="layui-form-label">购买关注点</label> 
            <div class="layui-input-block"> 
               <input type="text" name="buyingConcerns" class="layui-input inline-input" /> 
            </div> 
          </div> 
         </div> 
         </div> 
         <div class="layui-layer-btn my_skin"> 
           <a class="layui-layer-btn1" id="goback">返回</a> 
         </div> 

      </form>
    </div> 

  </div> 
  <script src="../../../layuiadmin/layui/layui.js"></script> 
  <script>
      layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
      }).extend({
        index: 'lib/index', //主入口模块
        list: 'cueManagement/list', //线索管理： 跟进模块
      }).use(['index','list','form','jquery'],function () {
    
      var form = layui.form
        ,$ = layui.jquery
        ,element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
       
      //Tab自定义数据
      var data=[
                {
                  title:"title1",
                  buyingConcerns:"title",
                  followTheWay:"方式1,方式2,方式三",
                },{
                  title:"title2",
                  buyingConcerns:"title",
                },{
                  title:"title3",
                  buyingConcerns:"title",
                }
              ]
       
        //获取自定义数据长度
        var dataLength = data.length;
        console.log(dataLength);
        
        //跟进数组长度动态生tab按钮
        for(var i=0;i<data.length;i++){
            //获取循环的数据
            var item = data[i];
            $("#tab-btn").append("<li class='tab-btn'>"+i+"</li>")
        }
        
        $("#tab-btn").on("click","li",function () {

           $(this).addClass('tab-btnactive').siblings().removeClass('tab-btnactive');
            
           //当前点击选项卡的索引
           var activeIndex = $(this).index();
           console.log(activeIndex);
           console.log(data)
           console.log(data[activeIndex].title)
           
           $('#time').val(data[activeIndex].title);

           var b =  data[activeIndex].followTheWay;
           //var a = b.split(",");
           var result = [];
          for (var i = 0,len = b.length; i < len; i += 6) { //每组六个
              var strObjcet = b.slice(i, i + 6);
              var str = strObjcet.toString();
              str = str.replace(/,/g, "         "); //将所有的逗号 替换成空格
              result.push(str);
          }
          
          console.log(22222);
           $('#followTheWay').val(result);
           
        }); 
        
       //Tab事件
       
     
 });
</script>  
 </body>
</html>